#include "thread_pool.hpp"
#include <unistd.h>
#include "task.hpp"
#include <cstdlib>
#include <time.h>

using namespace ns_thread_pool;
using namespace NSTask;

static const char* signal = "+-*/%";

int main()
{
    srand((unsigned)time(nullptr));
    while(true)
    {
        int x = rand() % 20 + 1;
        int y = rand() % 10 + 1;
        char ch = signal[rand() % 5];
        task t(x, y, ch);

        ThreadPool<task>::GetInstance()->Push(t);
        sleep(1);
    }
    return 0;
}